package org.aokey.spring.ioc.config;

import org.aokey.spring.ioc.creat2car.Tire;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
public class BeanConfig {
    @Bean
    public Tire t1(){
        return new Tire(12,"blue");
    }
    @Bean("t3")
    public Tire t2(){
        return new Tire(11,"red");
    }
    @Bean
    private int num(){
        return 3;
    }
    @Bean
    public Tire t4(int num){
        return new Tire(num,"green");
    }
}
